package com.aop_annotation;

import org.springframework.context.ApplicationContext;
//import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import entity.*;

public class Test {
	public static void main(String[] args) {
		 ApplicationContext ctx = new FileSystemXmlApplicationContext(
		 "src/com/aop_annotation/applicationContext.xml");
//		ApplicationContext ctx = new ClassPathXmlApplicationContext(
//				"applicationContext.xml");
		CustomerDAO userDAO = (CustomerDAO) ctx.getBean("userDAO");
		Customer cust = new Customer();
		cust.setAccount("SPRING");
		cust.setPassword("SPRING");
		userDAO.save(cust);
	}
}
